#ifndef __PRIMITIVE_OBJ__
#define __PRIMITIVE_OBJ__

#include <GL\glew.h>
#include <GLFW\glfw3.h>
#include <glm\glm.hpp>

#include "Structs.h"

class PrimitiveObject
{
protected:
   GLuint *indexData, attribLoc[3];
   GLuint VAOHandle, vertexID, indexID;
   int structType; //See Strutcs.h enum type
   int numCoords, numIndex;
   glm::vec3 *coordData; // Only Vertex positions
   Vertex::PN *coordDataN; // Struct of vertex positions and normals
   Vertex::PNT *coordDataNC; // Struct of vertex positions, normals and texture 

   glm::mat4 transform;

   virtual void fill (void); //Fill coordData* 
   virtual void genBuffer (void); //Generate buffer for vbo/vao
   virtual void freeBuffer (void); 

public:
   
   PrimitiveObject (int structType);
   virtual void init (void);
   virtual void draw (void);
   void setTransform (const glm::mat4 &t);   
   const glm::mat4 &getTransform (void);   
   ~PrimitiveObject ();
};

#endif